import Layout from '@/layout'

const ordersRouter = {
  path: '/orders',
  component: Layout,
  redirect: '/orders/list',
  name: 'orders',
  meta: { 
    alwaysShow: true,
    title: 'orders', 
    icon: 'orders', 
    permission: ['orders_102_01']
  },
  children: [
    {
      path: 'list',
      component: () => import('@/views/orders/list'),
      name: 'orders_list',
      meta: { 
        title: 'orders_list',
        permission: ['orders_107_02']
      },   
    },
    {
      path: 'edit/:id',
      component: () => import('@/views/orders/orderForm'),
      name: 'orders_edit',
      meta: { 
        hidden: true,
        title: 'orders_edit',
        permission: ['orders_154_03'],
        type: 'edit',
        activeMenu: '/orders/list',
      },   
    },
    {
      path: 'detail/:id',
      component: () => import('@/views/orders/orderForm'),
      name: 'orders_detail',
      meta: { 
        hidden: true,
        title: 'orders_detail',
        permission: ['orders_155_03'],
        type: 'detail',
        activeMenu: '/orders/list',
      },   
    },
  ]
}

export default ordersRouter
